<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <meta charset="utf-8"/>
    <title>支付方式列表</title>
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/admin/css/style.css"/>
    <link rel="stylesheet" type="text/css"
          href="https://cdn.bootcss.com/twitter-bootstrap/4.2.1/css/bootstrap.min.css"/>
    <script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
    <script src="${pageContext.request.contextPath}/admin/js/bootstrap.min.js" type="text/javascript"
            charset="utf-8"></script>
    <script src="${pageContext.request.contextPath}/admin/js/bootbox.min.js"></script>
    <style>
        img {
            width: 40px;
            height: 30px;
        }

        /*页码div的样式*/
        .pageIndex {
            width: 600px;
            text-align: center;
            margin: 30px auto;
        }

        .pageIndex a {
            width: 22px;
            height: 22px;
            display: inline-block;
            text-align: center;
            line-height: 22px;
            background-color: #3ea2ee;;
            color: white;
            text-decoration: none;
        }

        .active {
            background-color: #4e3fe6 !important;
        }
    </style>
</head>
<body>
<div class="box">
    <div class="content">
        <!--搜索输入框及查询、重置按钮-->
        <div class="container content_width">
            <div class="person_search">
                <div class="search_input">
                    <div class="input-group mb-3">
                        <span>商品名称：</span>
                        <input id="Ktext" type="text" class="form-control" placeholder="请输入商品名称">
                    </div>
                </div>
                <div class="search_input">
                    <div class="input-group mb-3">
                        <span>商品类别：</span>
                        <input id="job_num" type="text" class="form-control" placeholder="请输入商品类别">
                    </div>
                </div>
                <div class="search_input">
                    <button class="btn btn-primary search_btn" type="submit" id="search_btn">查询</button>
                    <button class="btn btn-primary search_btn" type="reset" id="back_btn">重置</button>
                </div>
            </div>
            <div class="line"></div>
        </div>
        <!--添加按钮及bootstrap的模态框-->
        <div class="export">
            <div style="width: 300px;margin: 0 auto;text-align: center;color: red">${msg}</div>
            <form action="/admin/paymentSave" method="get">
                <button id="new_add" type="submit" class="btn btn-primary btn-sm" data-toggle="modal"
                        data-target="#renyuan">
                    <img src="img/add_two.png"/>
                    <span>添加</span>
                </button>
            </form>
        </div>
        <!--修改按钮及bootstrap的模态框-->

        <!--表格列表-->
        <table id="tb" class="table">
            <thead>
            <tr>
                <th>编号</th>
                <th>支付方式名称</th>
                <th>编辑</th>
            </tr>
            </thead>
            <tbody id="show_tbody">
            <tr>
                <c:forEach items="${list}" var="payment" varStatus="status">
            <tr>
                <td align="center">${status.index+1}</td>
                <td align="center">${payment.paymentName}</td>
                <td align="center" valign="middle">
                    <a href="${pageContext.request.contextPath}/admin/paymentDelete?paymentId=${payment.paymentId}"
                       onclick="if(confirm('是否确定删除？')==false)return false">删除</a>&nbsp;&nbsp;
                    <a class=""
                       href="${pageContext.request.contextPath}/admin/paymentFind?paymentId=${payment.paymentId}">修改</a>
                </td>
                    <%--                            <a class="edit" href="#">修改</a></td>--%>
            </tr>
            </c:forEach>
            </tr>
            </tbody>
        </table>
        <%--显示页码的div--%>
        <%--        <div class="pageIndex">--%>
        <%--            <c:forEach items="${page.pageIndex}" var="item">--%>
        <%--                <c:if test="${item ne '...'}">--%>
        <%--                    <c:if test="${(page.currentIndex eq item) && !(empty item) }">--%>
        <%--                        <a class="active" href="${pageContext.request.contextPath}/admin/paymentList?index=${item}">${item}</a>--%>
        <%--                    </c:if>--%>
        <%--                    <c:if test="${page.currentIndex ne item && !(empty item)}">--%>
        <%--                        <a href="${pageContext.request.contextPath}/admin/paymentList?index=${item}">${item}</a>--%>
        <%--                    </c:if>--%>
        <%--                </c:if>--%>
        <%--                <c:if test="${item eq '...'}">--%>
        <%--                    <a href="">${item}</a>--%>
        <%--                </c:if>--%>
        <%--            </c:forEach>--%>
        <%--        </div>--%>
        <%--        <div style="width: 600px;text-align: center;margin: 0 auto;color: #61666e;font-size: 12px;font-weight: bolder;">当前第${page.currentIndex}页，共${page.totalPage}页--%>
        <%--        </div>--%>
        <%--    </div>--%>
        <%--</div>--%>

        <script src="${pageContext.request.contextPath}/admin/js/mejs.js"></script>
        <%--<script src="${pageContext.request.contextPath}/admin/js/paymentSave_BySelf.js"></script>--%>
</body>
</html>
